<?php

class DB_ADMIN_LOG extends ORM_Table {
    static protected $table_name = 'admin_log';
    
    static public function getTableName($params = null) {
        //$table_name = self::$table_name.substr($params['article_type_id'], 0, 1);
        return self::$table_name;
    }

    /**
     * 记录登陆日志
     * @param <type> $adminId
     */
    public static  function writeLog($adminId) {
        $log    = new DB_ADMIN_LOG();
        $log->setAdminId($adminId);
        $log->setIp(getIp());
        $log->setLogTime(time());
        $log->save();
        return true;
    }
}

